package de.rj.urwalking.data.survey;

import android.content.Context;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import de.rj.urwalking.R;


/**
 * 
 * A Question that introduces several other questions and cannot be answered. Its UI consists only of the introducing question text.
 * 
 * @author rjj
 *
 */

public class HeaderQuestion extends Question {


	private static final long serialVersionUID = 1L;


	public HeaderQuestion(int id, int itemNumber, String text, int scaleId,
			int screen) {
		super(id, itemNumber, text, scaleId, screen);

	}

	
	@Override
	public View buildView(Context context, ViewGroup parent) {
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		
		View questionView = inflater.inflate(R.layout.question_header, parent, false);
		TextView questionText = (TextView) questionView.findViewById(R.id.questionText);
				
		questionText.setText(Html.fromHtml(getText()));		
		
		return questionView;

	}

	@Override
	public boolean hasBeenAnswered() {
		return false;
	}


	@Override
	public boolean canBeAnswered() {
		return false;
	}


}
